File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/engine/query/HQLQueryPlan.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/hql/ast/QueryTranslatorImpl.java | |||
Method name: List performList(QueryParameters, SessionImplementor)
|
Method name: List list(SessionImplementor, QueryParameters)
|
|||
Number of AST nodes: 10 | Number of AST nodes: 10 | |||
1 | for ( int x = 0; x < size; x++ ) {↵ | 1 | for ( int i = 0; i < size; i++ ) {↵ | |
2 | final Object result = tmp.get( x );↵ | 2 | final Object result = results.get( i );↵ | |
3 | if ( ! distinction.add( result ) ) {↵ | 3 | if ( !distinction.add( result ) ) {↵ | |
4 | continue;↵ | 4 | continue;↵ | |
5 | }↵ | 5 | }↵ | |
6 | includedCount++;↵ | 6 | includedCount++;↵ | |
7 | if ( includedCount < first ) {↵ | 7 | if ( includedCount < first ) {↵ | |
8 | continue;↵ | 8 | continue;↵ | |
9 | }↵ | 9 | }↵ | |
10 | combinedResults.add( result );↵ | 10 | tmp.add( result );↵ | |
11 | ↵ | 11 | // NOTE : ( max - 1 ) because first is zero-based while max is not...↵ | |
12 | if ( max >= 0 && includedCount > max ) {↵ | 12 | if ( max >= 0 && ( includedCount - first ) >= ( max ↵ | |
13 | // break the outer loop !!!↵ | |||
14 | break translator_loop↵ | 13 | - 1 ) ) {↵ | |
15 | ;↵ | 14 | break;↵ | |
16 | }↵ | 15 | }↵ | |
17 | } | 16 | } | |
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.8 |
Clones location | Clones are in different classes |
Number of node comparisons | 36 |
Number of mapped statements | 8 |
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.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
23 | for (int x = 0; x < size; x++) |
| 21 | for (int i = 0; i < size; i++) | ||||||||||||||||
24 | final Object result = tmp.get(x); |
| 22 | final Object result = results.get(i); | ||||||||||||||||
25 | if (!distinction.add(result)) | 23 | if (!distinction.add(result)) | |||||||||||||||||
26 | continue; | 24 | continue; | |||||||||||||||||
27 | includedCount++; | 25 | includedCount++; | |||||||||||||||||
28 | if (includedCount < first) | 26 | if (includedCount < first) | |||||||||||||||||
29 | continue; | 27 | continue; | |||||||||||||||||
30 | combinedResults.add(result); |
| 28 | tmp.add(result); |
Row | Violation |
---|