File path: /hibernate-distribution-3.3.2.GA/project/cache-jbosscache2/src/test/java/org/hibernate/test/cache/jbc2/functional/classloader/CacheAccessListener.java | File path: /hibernate-distribution-3.3.2.GA/project/cache-jbosscache2/src/test/java/org/hibernate/test/cache/jbc2/functional/classloader/CacheAccessListener.java | |||
Method name: void nodeModified(NodeModifiedEvent)
|
Method name: void nodeCreated(NodeCreatedEvent)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | if (!event.isPre())↵ | 1 | if (!event.isPre())↵ | |
2 | {↵ | 2 | {↵ | |
3 | Fqn<String> fqn = event.getFqn();↵ | 3 | Fqn<String> fqn = event.getFqn();↵ | |
4 | System.out.println("MyListener - Modified node " + fqn.toString());↵ | 4 | System.out.println("MyListener - Created node " + fqn.toString());↵ | |
5 | modified.add(fqn);↵ | 5 | modified.add(fqn);↵ | |
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.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 16 |
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.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (!event.isPre()) |
| 1 | if (!event.isPre()) | |||||||||||
2 | Fqn<String> fqn = event.getFqn(); |
| 2 | Fqn<String> fqn = event.getFqn(); | |||||||||||
3 | System.out.println("MyListener - Modified node " + fqn.toString()); |
| 3 | System.out.println("MyListener - Created node " + fqn.toString()); | |||||||||||
4 | modified.add(fqn); | 4 | modified.add(fqn); |
Row | Violation |
---|---|
1 | Type org.jboss.cache.notifications.event.NodeModifiedEvent of variable event does not match with type org.jboss.cache.notifications.event.NodeCreatedEvent of variable event |
2 | Type org.jboss.cache.notifications.event.NodeModifiedEvent of variable event does not match with type org.jboss.cache.notifications.event.NodeCreatedEvent of variable event |