File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/bytecode/buildtime/AbstractInstrumenter.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/action/BulkOperationCleanupAction.java | |||
Method name: void execute(Set)
|
Method name: void evictCollectionRegions()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 5 | |||
1 | Iterator itr = fi↵ | 1 | if ( affectedCollectionRoles != null ) {↵ | |
2 | les.iterator();↵ | 2 | Iterator itr = affectedCollectionRoles.iterator();↵ | |
3 | while ( itr.hasNext() ) {↵ | 3 | while ( itr.hasNext() ) {↵ | |
4 | final File file = ( File ) itr.next();↵ | 4 | final ↵ | |
5 | collectClassNames( file, class↵ | 5 | String roleName = ( String ) itr.next();↵ | |
6 | Names );↵ | 6 | session.getFactory().evictCollection( roleName );↵ | |
7 | ↵ | 7 | }↵ | |
8 | } | 8 | } | |
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.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 11 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 2.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5 | Iterator itr = files.iterator(); |
| 2 | Iterator itr = affectedCollectionRoles.iterator(); | ||||||||||||||||||||
6 | while (itr.hasNext()) | 3 | while (itr.hasNext()) | |||||||||||||||||||||
|
| 4 | final String roleName = (String)itr.next(); | |||||||||||||||||||||
7 | final File file = (File)itr.next(); |
| | |||||||||||||||||||||
8 | collectClassNames(file, classNames); |
| 5 | session.getFactory().evictCollection(roleName); |
Row | Violation |
---|---|
1 | Unmatched statement final String roleName=(String)itr.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement final File file=(File)itr.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Expression collectClassNames(file,classNames) is a void method call, and thus it cannot be parameterized |
4 | Expression session.getFactory().evictCollection(roleName) is a void method call, and thus it cannot be parameterized |
5 | Expression collectClassNames(file,classNames) is a void method call, and thus it cannot be parameterized |
6 | Expression session.getFactory().evictCollection(roleName) is a void method call, and thus it cannot be parameterized |