File path: /hibernate-distribution-3.3.2.GA/project/cache-jbosscache/src/main/java/org/hibernate/cache/OptimisticTreeCache.java | File path: /hibernate-distribution-3.3.2.GA/project/cache-jbosscache/src/main/java/org/hibernate/cache/OptimisticTreeCache.java | |||
Method name: void remove(Object)
|
Method name: void update(Object, Object)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | Option option = new Option();↵ | 1 | Option option = new Option();↵ | |
2 | option.setDataVersion( NonLockingDataVersion.INSTANCE );↵ | 2 | option.setDataVersion( NonLockingDataVersion.INSTANCE );↵ | |
3 | cache.remove( new Fqn( regionFqn, key ), option ); | 3 | cache.put( new Fqn( regionFqn, key ), ITEM, value, option ); | |
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.0 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 5 |
Number of mapped statements | 3 |
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.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | Option option = new Option(); | 2 | Option option = new Option(); | ||||||||||||||||||||||
4 | option.setDataVersion(NonLockingDataVersion.INSTANCE); | 3 | option.setDataVersion(NonLockingDataVersion.INSTANCE); | ||||||||||||||||||||||
5 | cache.remove(new Fqn(regionFqn, key), option); |
| 4 | cache.put(new Fqn(regionFqn, key), ITEM, value, option); |
Row | Violation |
---|---|
1 | Expression cache.remove(new Fqn(regionFqn,key),option) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression cache.put(new Fqn(regionFqn,key),ITEM,value,option) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression cache.remove(new Fqn(regionFqn,key),option) is a void method call, and thus it cannot be parameterized |
4 | Expression cache.put(new Fqn(regionFqn,key),ITEM,value,option) is a void method call, and thus it cannot be parameterized |
5 | Expression cache.remove(new Fqn(regionFqn,key),option) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression cache.put(new Fqn(regionFqn,key),ITEM,value,option) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression cache.remove(new Fqn(regionFqn,key),option) is a void method call, and thus it cannot be parameterized |
8 | Expression cache.put(new Fqn(regionFqn,key),ITEM,value,option) is a void method call, and thus it cannot be parameterized |