File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/cache/UpdateTimestampsCache.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/cache/UpdateTimestampsCache.java | |||
Method name: void preinvalidate(Serializable[])
|
Method name: void invalidate(Serializable[])
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | Long ts = new Long( region.nextTimestamp() + region.getTimeout() );↵ | 1 | Long ts = new Long( region.nextTimestamp() );↵ | |
2 | //TODO: if lock.getTimestamp().equals(ts)↵ | |||
2 | for ( int i=0; i<spaces.length; i++ ) {↵ | 3 | for ( int i=0; i<spaces.length; i++ ) {↵ | |
3 | if ( log.isDebugEnabled() ) {↵ | 4 | if ( log.isDebugEnabled() ) {↵ | |
4 | log.debug( "Pre-invalidating space [" + spaces[i] + "]" );↵ | 5 | log.debug( "Invalidating space [" + spaces[i] + "], timestamp: " + ts);↵ | |
5 | }↵ | 6 | }↵ | |
6 | //put() has nowait semantics, is this really appropriate?↵ | 7 | //put() has nowait semantics, is this really appropriate?↵ | |
7 | //note that it needs to be async replication, never local or sync↵ | 8 | //note that it needs to be async replication, never local or sync↵ | |
8 | region.put( spaces[i], ts );↵ | 9 | region.put( spaces[i], ts );↵ | |
9 | } | 10 |
| |
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.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 9 |
Number of mapped statements | 5 |
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) | 1.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Long ts = new Long(region.nextTimestamp() + region.getTimeout()); |
| 1 | Long ts = new Long(region.nextTimestamp()); | |||||||||||||||
2 | for (int i = 0; i < spaces.length; i++) | 2 | for (int i = 0; i < spaces.length; i++) | ||||||||||||||||
3 | if (log.isDebugEnabled()) | 3 | if (log.isDebugEnabled()) | ||||||||||||||||
4 | log.debug("Pre-invalidating space [" + spaces[i] + "]"); |
| 4 | log.debug("Invalidating space [" + spaces[i] + "], timestamp: " + ts); | |||||||||||||||
5 | region.put(spaces[i], ts); | 5 | region.put(spaces[i], ts); |
Row | Violation |
---|---|
1 | Expression "Pre-invalidating space [" + spaces[i] + "]" cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression "Invalidating space [" + spaces[i] + "], timestamp: "+ ts cannot be parameterized, because it has dependencies to/from statements that will be extracted |