File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/impl/FetchingScrollableResultsImpl.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/impl/FetchingScrollableResultsImpl.java | |||
Method name: boolean scroll(int)
|
Method name: boolean scroll(int)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | for ( int i = 0; i < positions; i++ ) {↵ | 1 | for ( int i = 0; i < ( 0 - positions ); i++ ) {↵ | |
2 | more = next();↵ | 2 | more = previous();↵ | |
3 | if ( !more ) {↵ | 3 | if ( !more ) {↵ | |
4 | break;↵ | 4 | break;↵ | |
5 | }↵ | 5 | }↵ | |
6 | } | 6 |
| |
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 | 9 |
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) | 0.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | for (int i = 0; i < positions; i++) |
| 8 | for (int i = 0; i < (0 - positions); i++) | ||||||||||||
4 | more = next(); |
| 9 | more = previous(); | ||||||||||||
5 | if (!more) | 10 | if (!more) | |||||||||||||
6 | break; | 11 | break; |
Row | Violation |
---|---|
1 | Expression next() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression previous() cannot be parameterized, because it has dependencies to/from statements that will be extracted |