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 evictEntityRegions()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 5 | |||
1 | Iterator itr = fil↵ | 1 | if ( affectedEntityNames != null ) {↵ | |
2 | es.iterator();↵ | 2 | Iterator itr = affectedEntityNames.iterator();↵ | |
3 | while ( itr.hasNext() ) {↵ | 3 | while ( itr.hasNext() ) {↵ | |
4 | final File file = ( File ) itr.next();↵ | 4 | final ↵ | |
5 | collectClassNames( file, class↵ | 5 | String entityName = ( String ) itr.next();↵ | |
6 | Names );↵ | 6 | session.getFactory().evictEntity( entityName );↵ | |
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.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5 | Iterator itr = files.iterator(); |
| 2 | Iterator itr = affectedEntityNames.iterator(); | ||||||||||||||||||||
6 | while (itr.hasNext()) | 3 | while (itr.hasNext()) | |||||||||||||||||||||
|
| 4 | final String entityName = (String)itr.next(); | |||||||||||||||||||||
7 | final File file = (File)itr.next(); |
| | |||||||||||||||||||||
8 | collectClassNames(file, classNames); |
| 5 | session.getFactory().evictEntity(entityName); |
Row | Violation |
---|---|
1 | Unmatched statement final String entityName=(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().evictEntity(entityName) 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().evictEntity(entityName) is a void method call, and thus it cannot be parameterized |