File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/engine/StatefulPersistenceContext.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/mapping/PersistentClass.java | |||
Method name: void serialize(ObjectOutputStream)
|
Method name: void checkColumnDuplication()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 5 | |||
1 | while ( itr.hasNext() ) {↵ | 1 | while ( iter.hasNext() ) {↵ | |
2 | Map.Entry entry = ( Map.Entry ↵ | 2 | cols.clear();↵ | |
3 | ) itr.next();↵ | 3 | Join join = (Join) iter.next();↵ | |
4 | oos.writeObject( entry.getKey() );↵ | 4 | ↵ | |
5 | ( ( CollectionEntry ) entry.getValue() ).serialize( oos↵ | 5 | checkColumnDuplication( cols, join.getKey().getColumnIterator() );↵ | |
6 | );↵ | 6 | checkPropertyColumnDuplication( cols, join.getPropertyIterator() );↵ | |
7 | } | 7 |
| |
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 | 20 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 4 |
Time elapsed for statement mapping (ms) | 3.3 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
48 | while (itr.hasNext()) |
| 7 | while (iter.hasNext()) | ||||||||||
| 8 | cols.clear(); | ||||||||||||
|
| 9 | Join join = (Join)iter.next(); | |||||||||||
|
| 10 | checkColumnDuplication(cols, join.getKey().getColumnIterator()); | |||||||||||
|
| 11 | checkPropertyColumnDuplication(cols, join.getPropertyIterator()); | |||||||||||
49 | Map.Entry entry = (Map.Entry)itr.next(); |
| | |||||||||||
50 | oos.writeObject(entry.getKey()); |
| | |||||||||||
51 | ((CollectionEntry)entry.getValue()).serialize(oos); |
| |
Row | Violation |
---|---|
1 | Unmatched statement Join join=(Join)iter.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement checkColumnDuplication(cols,join.getKey().getColumnIterator()); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
3 | Unmatched statement checkPropertyColumnDuplication(cols,join.getPropertyIterator()); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
4 | Unmatched statement Map.Entry entry=(Map.Entry)itr.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
5 | Unmatched statement oos.writeObject(entry.getKey()); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
6 | Unmatched statement ((CollectionEntry)entry.getValue()).serialize(oos); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
7 | The refactoring of the clones is infeasible, because the number of macthed statements is equal to zero |